<!--
 * @Author: 少女的麒麟臂 1196347069@qq.com
 * @Date: 2024-03-13 20:12:22
 * @LastEditors: 少女的麒麟臂 1196347069@qq.com
 * @LastEditTime: 2024-03-14 08:44:31
 * @FilePath: \vue2-study\src\views\17.组件\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <!-- 注册局部组件 -->
    <componentA></componentA>
    <componentB></componentB>
    <hr />
    <!-- 组件全局注册 -->
    <!-- <global-com></global-com>
    <global-use></global-use> -->
    <div>value: {{ value }}</div>
    <button @click="handClick">改变value的值</button>
  </div>
</template>

<script>
import componentA from '@/views/17.组件/components/component-a.vue'
import componentB from '@/views/17.组件/components/component-b.vue'
export default {
  name: 'zujian',
  components: { componentA, componentB },
  data() {
    return {
      value: 1
    }
  },
  methods: {
    handClick() {
      this.value = 2
    }
  }
}
</script>

<style lang="scss" scoped></style>
